<template>
  <div class="header">
    <nav class="nav-bar">
      <ul class="nav-links">
        <li>
          <a
            :class="{active: route.path === '/laugh'}"
            href="javascript:;"
            @click="router.push('/laugh')"
          >LAUGH</a>
        </li>
        <li>
          <a
            :class="{active: route.path === '/airdrop'}"
            href="javascript:;"
            @click="router.push('/airdrop')"
          >AIRDROP</a>
        </li>
        <li>
          <a href="https://x.com/BlockJokerCoin" target="_blank" rel="noopener noreferrer">JOKER-X</a>
        </li>
      </ul>
  </nav>
  </div>
</template>

<script setup>
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
</script>

<style lang="less" scoped>
.header {
  height: 43px;
}

.nav-bar {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 43px;
  background-color: rgba(0, 0, 0, 0.7);
  /* 半透明黑色背景 */
  backdrop-filter: blur(5px);
  /* 添加模糊效果，增强视觉体验 */
  -webkit-backdrop-filter: blur(5px);
  /* Safari 浏览器兼容性 */
  padding: 0.5rem 0;
  /* 导航栏高度 */
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Share Tech Mono', monospace;
  opacity: 1 !important;
  visibility: visible !important;
  border-bottom: 1px solid rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
  transition: background-color 0.3s ease;
  /* 平滑过渡效果 */
}

/* 鼠标悬停时稍微提高导航栏透明度 */
.nav-bar:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.nav-links {
  display: flex;
  padding: 0;
  list-style: none;
  align-items: center;
  gap: 64px;
}

.nav-links li {
  position: relative;
}

.nav-bar .nav-links a {
  color: rgba(0, 255, 255, 0.65); /* Cyberpunk cyan with opacity */
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 2px;
  transition: color 0.25s ease;
  padding: 8px 0;
  font-family: 'Share Tech Mono', monospace;
  font-weight: 540 !important;
}

.nav-bar .nav-links a:hover {
  color: #00FFFF;
}

.nav-bar .nav-links a.active {
  color: #00FFFF;
  font-weight: 540 !important;
}
</style>
